package com.spleeb.pixelengine;

public class StringModel extends Model {

	public StringModel(String string,int color1,int color2) {
		colors = new int[]{color1,color2};
		setString(string);
	}
	public void setString(String string){
		int len = string.length();
		int[] pop = new int[len*6*5];
		for (int i = 0;i<len;i++){
			int[] ar = Letters.getLetter(string.charAt(i));
			for (int x = 0;x<5;x++){
				for (int y = 0;y<5;y++){
					int ap = (x+i*6)*5 + y;
					int pap = (y*5)+x;
					pop[ap] = ar[pap];
				}
			}
			int x = 5;
			for (int y = 0;y<5;y++){
				int ap = (x+i*6)*5 + y;
				int pap = (y*5)+x;
				pop[ap] = 0;
			}
		}
		width = len*6;
		height = 5;
		inds = pop;
		fixDimensions();
	}

}
